package com.llyb.controller;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.llyb.inter.ChatAssistant;
import com.llyb.service.InvoiceHandler;
import com.llyb.service.WeatherService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class FunctionChatModelController {

    @Autowired
    private ChatAssistant chatAssistant;


    // http://localhost:9011/chatfunction/chat1
    @GetMapping("/chatfunction/chat1")
    public String chatFunction() {

        String chat = chatAssistant.chat("开张发票,公司:某某某有限公司 税号：company533 金额：668.12");

        System.out.println(chat);

        return "开具成功";
    }

}
